package com.wpw.dream.dubbo.rest.entry;

import java.io.Serializable;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

/**
 * 定制序列化
 * 
 * Project Name：dream-dubbo-rest
 * ClassName：User
 * Description：
 * @author: wupengwei
 * @date: 2018年3月28日 上午11:44:36
 * note:
 *
 */
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class User implements Serializable {

	/**
	 * @Fields serialVersionUID : TODO
	 */
	private static final long serialVersionUID = 1L;

	private Long id;

	//定制对象属性映射到XML元素的名字
	@XmlElement(name = "name")
	private String userName;

	private String sex;

	public User() {
	}

	public User(Long id, String userName, String sex) {
		this.id = id;
		this.userName = userName;
		this.sex = sex;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	@Override
	public String toString() {
		return "User [id=" + id + ", userName=" + userName + ", sex=" + sex + "]";
	}
	
	

}
